<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="org.ralasafe.WebRalasafe"%>	
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	WebRalasafe.getBusinessPrivilegeTree(request);
	Map<String,Object> mcmsSession = (Map<String,Object>)session.getAttribute("mcmsSession");
	if(mcmsSession == null){
		mcmsSession = new HashMap<String,Object>();
	}
	mcmsSession.put("mcmsUser",WebRalasafe.getCurrentUser(request));
	
	System.out.println(WebRalasafe.getBusinessPrivilegeTree(request));
	System.out.println("id======="+WebRalasafe.getCurrentUser(request).getId());
	System.out.println("name======="+WebRalasafe.getCurrentUser(request).get("name"));
	System.out.println("companyid======="+WebRalasafe.getCurrentUser(request).get("companyId"));
	boolean isDebug = true;
%>	
<%@page import="org.ralasafe.WebRalasafe"%>
<%@page import="java.util.Random"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>客户信息管理系统</title>

<link href="<%=basePath %>themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="<%=basePath %>themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="<%=basePath %>themes/css/print.css" rel="stylesheet" type="text/css" media="print"/>
<link href="<%=basePath %>uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE]>
<link href="<%=basePath %>themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->

<script src="<%=basePath %>js/speedup.js" type="text/javascript"></script>
<script src="<%=basePath %>js/jquery-1.7.1.js" type="text/javascript"></script>
<script src="<%=basePath %>js/jquery.cookie.js" type="text/javascript"></script>
<script src="<%=basePath %>js/jquery.validate.js" type="text/javascript"></script>
<script src="<%=basePath %>js/jquery.bgiframe.js" type="text/javascript"></script>
<script src="<%=basePath %>xheditor/xheditor-1.1.12-zh-cn.min.js" type="text/javascript"></script>
<script src="<%=basePath %>uploadify/scripts/swfobject.js" type="text/javascript"></script>
<script src="<%=basePath %>uploadify/scripts/jquery.uploadify.v2.1.0.js" type="text/javascript"></script>

<script src="<%=basePath %>js/dwz.core.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.util.date.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.validate.method.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.regional.zh.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.barDrag.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.drag.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.tree.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.accordion.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.ui.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.theme.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.switchEnv.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.alertMsg.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.contextmenu.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.navTab.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.tab.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.resize.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.dialog.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.dialogDrag.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.sortDrag.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.cssTable.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.stable.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.taskBar.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.ajax.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.pagination.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.database.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.datepicker.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.effects.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.panel.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.checkbox.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.history.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.combox.js" type="text/javascript"></script>
<script src="<%=basePath %>js/dwz.print.js" type="text/javascript"></script>
<!-- 
<script src="<%=basePath %>bin/dwz.min.js" type="text/javascript"></script>
-->
<script src="<%=basePath %>js/dwz.regional.zh.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	//alert("=======");
	DWZ.init("<%=basePath %>mcms/dwz.frag.xml", {
		loginUrl:"login_dialog.html", loginTitle:"登录",	// 弹出登录对话框
//		loginUrl:"login.html",	// 跳到登录页面
		statusCode:{ok:200, error:300, timeout:301}, //【可选】
		pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderDirection"}, //【可选】
		debug:false,	// 调试模式 【true|false】
		callback:function(){
			initEnv();
			$("#themeList").theme({themeBase:"<%=basePath %>themes"}); // themeBase 相对于index页面的主题base路径
		}
	});
});
</script>
</head>

<body scroll="no">
	<div id="layout">
		<!-- banner栏区域 begin -->
		<div id="header">
			<div class="headerNav">
				<a class="logo" href="#">标志</a>
				<ul class="nav">					
					<li><a href="changepwd.html" target="dialog" width="600">设置</a></li>
					<li><a href="<%=basePath %>mcms/login.jsp">退出</a></li>
					<li><a href="login.html"></a></li>
				</ul>
				<ul class="themeList" id="themeList">
					<li theme="default"><div class="selected">蓝色</div></li>
					<li theme="green"><div>绿色</div></li>					
					<li theme="purple"><div>紫色</div></li>
					<li theme="silver"><div>银色</div></li>
					<li theme="azure"><div>天蓝</div></li>
				</ul>
			</div>

			<!-- navMenu -->
			
		</div>
    <!-- banner栏区域 end -->


		<div id="leftside">
			<div id="sidebar_s">
				<div class="collapse">
					<div class="toggleCollapse"><div></div></div>
				</div>
			</div>
			<div id="sidebar">
				<div class="toggleCollapse"><h2>主菜单</h2><div>收缩</div></div>
        
        <!-- 各部门菜单树 begin -->
				<div class="accordion" fillSpace="sidebar">
					
					
					<!--  抽屉：系统管理  begin-->
					<!--
					<div class="accordionHeader">
						<h2><span>Folder</span>系统管理</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							<li><a href="<%=basePath %>userList.html?userName=aaa&actionType=userList" target="navTab" rel="page_xt1" title="用户管理">用户管理</a></li>
							<li><a href="<%=basePath %>deptList.html?userName=aaa&actionType=deptList" target="navTab" rel="page_xt2" title="部门管理">部门管理</a></li>
							<li><a href="<%=basePath %>roleList.html?userName=aaa&actionType=roleList" target="navTab" rel="page_xt3" title="角色管理">角色管理</a></li>							
							<li><a href="<%=basePath %>userList.html?userName=aaa&actionType=userList" target="navTab" rel="page_xt4" title="资源管理">资源管理</a></li> 
						</ul>
					</div>
					-->
					<!--  抽屉：系统管理  end-->
					
					
					<!--  抽屉：市场部  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									11)) {
								Random random = new Random();
					%>
					
					<div class="accordionHeader">
						<h2><span>Folder</span>市场部</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>客户管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?deptCode=sc&actionType=listCustom&tabId=page_sc1&flag=1" target="navTab" rel="page_sc1">客户信息查询</a></li>
									<li><a href="<%=basePath %>addCustom.html?userName=aaa&deptCode=sc&actionType=addCustom&tabId=page_sc2" target="navTab" rel="page_sc2" title="客户信息录入">客户信息录入</a></li>
									<!--<li><a href="<%=basePath %>main.html" target="navTab" rel="page_sc3">预约就诊</a></li>-->
									<li><a href="<%=basePath %>customCallBackList.html?userName=aaa&deptCode=sc&actionType=callBackList&tabId=page_sc3" target="navTab" rel="page_sc3">电话回访</a></li>	
									<li><a href="<%=basePath %>doctorAppointmentAlertList.html?userName=aaa&deptCode=sc&actionType=appointmentDoctorList&tabId=page_sc4" target="navTab" rel="page_sc4">预约提醒</a></li>
								</ul>
							</li>
							<!--
							<li><a>报表展示</a>
								<ul>
									<li><a href="<%=basePath %>mcms/w_panel.html" target="navTab" rel="w_panel">个人业绩统计报表</a></li>
									<li><a href="<%=basePath %>mcms/w_tabs.html" target="navTab" rel="w_tabs">部门业绩统计报表</a></li>-->
									<!-- rel: 相同时，将在同一个tab上显示；不同时，将创建新的tab（即：tab页签的id标识）-->
								<!--</ul>
							</li>-->
									
							
						</ul>
					</div>
					
					<%
						}
							}
					%>
					<!--  抽屉：市场部  end-->
					<!--  抽屉：电网部  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,12)) {
								Random random = new Random();
					%>
					
					<div class="accordionHeader">
						<h2><span>Folder</span>电网部</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>客户管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?deptCode=dw&actionType=listCustom&tabId=page_dw1&flag=1" target="navTab" rel="page_dw1">客户信息查询</a></li>
									<li><a href="<%=basePath %>addCustom.html?userName=aaa&deptCode=dw&actionType=addCustom&tabId=page_dw2" target="navTab" rel="page_dw2" title="客户信息录入">客户信息录入</a></li>
									<!--<li><a href="<%=basePath %>main.html" target="navTab" rel="page_sc3">预约就诊</a></li>-->
									<li><a href="<%=basePath %>customCallBackList.html?userName=aaa&deptCode=dw&actionType=callBackList&tabId=page_dw3" target="navTab" rel="page_dw3">电话回访</a></li>	
									<li><a href="<%=basePath %>doctorAppointmentAlertList.html?userName=aaa&deptCode=dw&actionType=appointmentDoctorList&tabId=page_dw4" target="navTab" rel="page_dw4">预约提醒</a></li>
								</ul>
							</li>
									
						</ul>
					</div>
					<!--  抽屉：电网部  end-->
					<%
						}
							}
					%>
					
					<!--  抽屉：分诊台  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									15)) {
								Random random = new Random();
					%>
					
				  <div class="accordionHeader">
						<h2><span>Folder</span>分诊台</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>分诊管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?deptCode=fz&actionType=listCustom&tabId=page_sc2&flag=1" target="navTab" rel="page_sc2" title="客户信息查询">客户信息查询</a></li>
									<li><a href="<%=basePath %>addCustom.html?userName=aaa&deptCode=fz&actionType=addCustom&tabId=page_sc1" target="navTab" rel="page_sc1" title="客户信息录入">客户信息录入</a></li>
									<li><a href="<%=basePath %>separateCustomList.html?userName=aaa&deptCode=fz&actionType=listSeparateCustom&tabId=page_sc3&flag=1" target="navTab" rel="page_sc3" title="开始分诊">开始分诊</a></li>
								</ul>
							</li>
									
							
						</ul>
					</div>
					<%
						}
							}
					%>
					<!--  抽屉：分诊台  end-->
					<!--  抽屉：现场部  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									13)) {
								Random random = new Random();
					%>
					
				  <div class="accordionHeader">
						<h2><span>Folder</span>现场部</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>客户管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?userName=aaa&deptCode=xs&actionType=listCustom&flag=1" target="navTab" rel="page_sc2">客户信息查询</a></li>
									<li><a href="<%=basePath %>receiveCustomList.html?userName=aaa&deptCode=xs&actionType=listCustomReceive&flag=1" target="navTab" rel="page_sc2" title="开始接诊">开始接诊</a></li>
									<li><a href="<%=basePath %>customCallBackList.html?userName=aaa&deptCode=xs&actionType=callBackList" target="navTab" rel="page_sc4">电话回访</a></li>
									<li><a href="<%=basePath %>doctorAppointmentAlertList.html?userName=aaa&deptCode=xs&actionType=appointmentDoctorList" target="navTab" rel="page_sc5">就诊提醒</a></li>
								</ul>
							</li>
						</ul>
					</div>
					<%
						}
							}
					%>
					<!--  抽屉：现场部  end-->
					<!--  抽屉：药房  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									61)) {
								Random random = new Random();
					%>
					
				  <div class="accordionHeader">
						<h2><span>Folder</span>药房</h2> 
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>取药管理</a>
								<ul>
									<li><a href="<%=basePath %>medicineReceiveList.html?userName=aaa&deptCode=yf&actionType=medicineReceive" target="navTab" rel="page_sc1">客户取药</a></li>
								</ul>
							</li>
						</ul>
					</div>
					<%
						}
							}
					%>
					<!--  抽屉：药房  end-->
					<!--  抽屉：手术室  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									67)) {
								Random random = new Random();
					%>
				  <div class="accordionHeader">
						<h2><span>Folder</span>手术室</h2>
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>客户管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?userName=aaa&deptCode=mz&actionType=listCustom&flag=1" target="navTab" rel="page_sc2">客户信息查询</a></li>
									<li><a href="<%=basePath %>receiveCustomList.html?userName=aaa&deptCode=mz&actionType=listCustomReceive&flag=1" target="navTab" rel="page_sc2">手术记录</a></li>
								</ul>
							</li>
							
						</ul>
					</div>
					<%
						}
							}
					%>
					<!--  抽屉：手术室  end-->
					<!--  抽屉：客服部  begin-->
					<%
						if(isDebug){
							if (WebRalasafe.hasPrivilege(request,
									16)) {
								Random random = new Random();
					%>
				  <div class="accordionHeader">
						<h2><span>Folder</span>客服部</h2> 
					</div>
					<div class="accordionContent">
						<ul class="tree treeFolder">
							
							<li><a>客户管理</a>
								<ul>
									<li><a href="<%=basePath %>customList.html?userName=aaa&deptCode=kf&actionType=listCustom&flag=1" target="navTab" rel="page_sc2">客户信息查询</a></li>
									<li><a href="<%=basePath %>receiveCustomList.html?userName=aaa&deptCode=kf&actionType=listCustomReceive&flag=1" target="navTab" rel="page_sc1">开始复诊</a></li>
									<li><a href="<%=basePath %>customCallBackList.html?userName=aaa&deptCode=kf&actionType=callBackList" target="navTab" rel="page_sc4">电话回访</a></li>
									<li><a href="<%=basePath %>doctorAppointmentAlertList.html?userName=aaa&deptCode=kf&actionType=appointmentDoctorList" target="navTab" rel="page_sc5">复查提醒</a></li>
									<!--
									<li><a href="<%=basePath %>main.html" target="navTab" rel="page_sc5">满意度调查</a></li>
									-->
								</ul>
							</li>
						</ul>
					</div>
					<%
						}
							}
					%>
					<!--  抽屉：客服部  end-->
					
				</div>
				<!-- 各部门菜单树 end -->
				
			</div>
		</div>
		 
		 <% session.setAttribute("mcmsSession",mcmsSession);%>
	<jsp:include page="access/mainPage.jsp" flush="true"></jsp:include>
	<div id="footer">Copyright &copy; 2012 <a href="#" target="dialog">新发现植发连锁机构</a> Tel：020-85585530</div>

</body>
</html>